<!DOCTYPE html>
<html lang="zh-cn">
<#include "../include/head.html"/>
<body class="hold-transition skin-green sidebar-mini fixed">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    <div class="content">
        <form class="form-horizontal" method="POST" action="${basePath}/cms/admin/webpage/update" >
            <input type="hidden" name="id" value="${webPage.id}">
        <@editForm labels=['标题'] names=['title'] model=webPage></@editForm>
            <div class="form-group">
                <label class="control-label col-sm-2">所属菜单</label>
                <div class=" col-sm-8 ">
                    <select class="form-control" name="menuid">
                    <#list menuList as item>
                        <option <#if item.id == webPage.menuid>selected</#if> value="${item.id}">${item.name!}</option>
                    </#list>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-2">内容</label>
                <div class=" col-sm-8 ">
                    <textarea class="form-control" id="editor" name="content" style="width: 100%;" >${webPage.content!}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-success btn-embossed">确定</button>
                    <button type="reset" class="btn btn-default btn-embossed">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<script src="${basePath}/assets/js/app.js"></script>
<script>
    KindEditor.ready(function (K) {
        window.editor = K.create("#editor", {
            uploadJson: '/file/uploadFile',
            fileManagerJson: '',
            allowFileManager: false
        });
    });
</script>
</html>